<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        img {
            vertical-align: middle;
        }
        
        div {
            position: relative;
            float: left;
        }
        
        div:hover::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 15px solid rgba(252, 255, 255, 0.2);
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <div>
        <img src="mi.jpg" alt="">
    </div>
    <div>
        <img src="mi.jpg" alt="" width="300">
    </div>
</body>

</html>